﻿
@{
    ViewBag.Title = "CloneButton";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="page-container" style="background-color: white;">
    <div class="page-content" style="background-color: white;">
        <div id="itemTree"></div>
    </div>
</div>
<script>
    var moduleId = $.fn.request("moduleId");
    $(function () {
        $("#itemTree").treeview({
            showcheck: true,
            url: "/SystemManage/ModuleButton/GetCloneButtonTreeJson"
        });
    });
    function submitForm() {
        var Ids = $("#itemTree").getCheckedAllNodes();
        $.fn.submitForm({
            url: "/SystemManage/ModuleButton/SubmitCloneButton",
            param: { moduleId: moduleId, Ids: String(Ids) },
            success: function () {
                top.modulebutton.$("#gridTable").resetSelection();
                top.modulebutton.$("#gridTable").trigger("reloadGrid");
            }
        })
    }
</script>
